package com.xu.mode.facade;

/**
 * 基金类也是外观类的外形 就是讲复杂的内部调用转化为外部的一个接口就可以完成负责的事件引用
 */
public class Fund {
    private stock1 stock1;
    private stock3 stock3;
    private stock2 stock2;

    public Fund() {
        this.stock1 = new stock1();
        this.stock2 = new stock2();
        this.stock3 = new stock3();
    }

    public void BuyFund() {
        stock1.buy();
        stock2.buy();
        stock3.buy();
    }

    public void sellFund() {
        stock1.sell();
        stock2.sell();
        stock3.sell();
    }
}
